-
Notifications
You must be signed in to change notification settings - Fork 5
Univ ldma handler dev #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
… only be 1. Modified logger-ldma to use universal handler.
…ting up false flags.
Seems that logger_ldma is expecting some other flag to function properly. Currently unable to fix logger_ldma myself (Lembitu). Went with easier approach letting logger_ldma to accept both flags. Currently seems to work. TODO: make actual fix
| #define SIZE_OF_ARRAY(arr) (sizeof(arr))/sizeof(arr[0]) | ||
|
|
||
| static volatile ldma_handler_conf_t m_head; | ||
| static volatile ldma_handler_conf_t m_head = {0xFF, NULL, 0, 0, NULL}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use structre members names to initialize them e.g. const osThreadAttr_t app_thread_attr = { .name = "app" };
| while(ptr != NULL) | ||
| { | ||
| if ( pending & (1<<ptr->channel) ) | ||
| if ( pending & (1 << ptr->channel) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BARR - remove spaces if ((pending & (1 << ptr->channel)))
|
|
||
|
|
||
| ldma_handler_conf_t* ptr = &m_head; | ||
| while(ptr != NULL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BARR - add space
| { | ||
| if ( pending & (1<<ptr->channel) ) | ||
| if ( pending & (1 << ptr->channel) ) | ||
| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identation - open all files in editor and convert tabs to spaces and check after that the indentation is correct
Madis242
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BARR
| m_ldma_handler_conf.signal = LOGGER_THREAD_FLAG_LDMA_DONE; | ||
| m_ldma_handler_conf.thrd = &m_ldma_thread; | ||
| m_ldma_handler_conf.thrd = m_ldma_thread; | ||
| m_ldma_handler_conf.name = 69; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use constants instead of mystical numbers. e.g. #define DEFAULT_CONF_NAME 69
|
This looks to duplicate functionality already provided by dmadrv.h ... which the logger already supports. dmadrv.h is also used by DALI and smenete microphones/microwave and there they all work together merrily. |
This adds universal LDMA handler.
Before only logger could use LDMA now through this handler any application is able to interface with LDMA.